<?php
class Bbling_Model_Resource_Balanace extends Bbling_Model_Resource_Abstract {
	

	protected function _construct() {
		$this->_init ( 'financial_monthly_expenses' );
	}
	
	public function getId($month, $financialId){
		$db = $this->getReadConnection ();
		$select = $db->select ()->from ( $this->getMainTable () )->where ( "financial_id =?", $financialId );
		$select->where("month =?", $month);
		$result = $db->fetchRow ( $select );
		return $result?$result['id']:null;
	}
}